home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / PublicDomain / Spiele / Ambassador / Upd140.lha / Upd / Upd.doc < prev    next >
Text File  |  1994-12-11  |  17KB  |  447 lines

  1. Release 1.40
  2.  
  3.         The minimal player daemon - upd
  4.         ===============================
  5.  
  6.    © 1991-1994 Jonas Petersson & Absolut Software (aka Sirius Soft)
  7.  
  8.  
  9.  
  10. Introduction:
  11. =============
  12.  
  13. Wouldn't it be nice to have a process hanging around to play any
  14. sound file for you on demand instead of you having to do all this
  15. mucking about with audio.device etc? But it really has to be small
  16. and it HAS to be able to play my very large samples anytime...
  17. I must be able to call it simply from anywhere - even from scripts!
  18.  
  19. Tricky, but it can be done.
  20.  
  21. As a feature you can register you favourite sounds in a configuration
  22. file and well behaved programs will use the ones you like right now.
  23. It also has Arexx support - to be truely honest, that the ONLY way to
  24. use it... As of 1.01, there is also a fade option.
  25.  
  26. Actually, "minimal" is not quite true anymore as speech is available
  27. starting 1.20... As a spin-off of this you also get a "say" program
  28. that can play phonemes.
  29.  
  30. 1.30 includes a way to preload the samples from disk.
  31.  
  32. 1.40 includes a way to register several IDs to be played at random and
  33. the ability to play every request to the end (disable the lookahead
  34. feature).
  35.  
  36. Current version works rather well along the way I intended. 
  37.  
  38.  
  39. Changes:
  40. ========
  41.  
  42. Option -Q turns on Queue mode where every single request is played
  43. to the end no matter how much is queued up. You have been warned.
  44. Specifying a FADE of "-1" gives the same result - obviously queue
  45. and fade are mutually exclusive.
  46.  
  47. If you register the same ID several times in the ID file (normally
  48. s:UPD.IDs) UPD will pick one of them at random.
  49.  
  50.  
  51. Usage:
  52. ======
  53.  
  54.     [run] upd [-bBUFSIZE] [-fIDFILE] [-pPRIORITY] [-M] [-Q]
  55.  
  56. The "run" is of course optional, but daemons really should be in the
  57. background unless you want the see the debugging information.  "BUFSIZE"
  58. is the amount of chip memory that each of the four buffers will use
  59. while playing.  (These are allocated at start to make sure you will be
  60. able to play anytime - as long as you can get hold of the audio
  61. channels...).  Default is 1024 and specifying less than 64 will give you
  62. the default. (I've heard that some people can't ever get anything good
  63. out with less than a 1K buffer - am I really the only one with a quick
  64. enough HD/SCSI interface?) 
  65.  
  66. NOTE: Don't make the buffer bigger than you actually need - a large
  67. buffer also means that the sample will start a little bit later since
  68. more information must be loaded before it can begin!
  69.  
  70. If the IDfile parameter exists, it will be used instead of the
  71. default s:upd.IDs. 
  72.  
  73. As of 1.20 I've also added the priority option to satisfy some requests
  74. from people who prefer their sound to be perfect before getting things
  75. done... You people may specify -p35 or something like that along with
  76. some huge buffer. Of course, you can also lower priority with this option.
  77.  
  78. As of 1.30, the -M option can be used to waste your RAM! If present at
  79. startup, upd will always try to find a memory space to load the sample
  80. into before playing it. If that fails the sample will play from disk
  81. as before. This will of course delay the sound a bit as well. For small
  82. samples there is hardly any difference, for medium size samples there
  83. is a delay but no access to the disk while playing, and for large samples
  84. things are just like before. (I don't use this option myself...)
  85.  
  86. As of 1.40, the -Q option turns om Queue mode from the start.
  87.  
  88. The above won't produce any sound as you probably realise.  Once run, the
  89. only way to talk to upd is with Arexx - I even removed the BREAK stuff
  90. that was in it for Zound, since Arexx could hang around waiting for a
  91. reply forever when you interupted the sound that way. The break will
  92. "wait" until the daemon is idle next time.
  93.  
  94. upd currently knows of these commands:
  95.  
  96.     file filepath [options] [anotherfilepath [options]]
  97.     id   id-in-s:upd.IDs
  98.         rescan new-id-file
  99.     fade #-of-steps-per-bufsize
  100.     say string-to-translate-and-say
  101.     phoneme phoneme-string-to-say
  102.     exit
  103.  
  104. The 'fade' command is new to 1.01 and might need some explanation:
  105. What is does is merely reconfigure upd for future requests. By default
  106. fade is set to 0 which means that any playing sound will be cut off
  107. as soon as a new AREXX command arrives. Any other number indicates that
  108. when a new request arrives, first fade out the current sound by lowering
  109. the volume by the specified amount by each played buffer until volume reaches
  110. zero. As the observant reader realises, a value exceeding 64 will do 
  111. the same thing as 0. As of 1.40 a negative value will put UPD in Queue mode.
  112.  
  113. 'say' and 'phoneme' are new as of 1.20 and their use should be obvious. 
  114. These are really just a spin-off from what was added to the ID file. 
  115. Speech currently won't fade - I fail to see the beauty in fading it... 
  116. NOTE: You must have LIBS:translator.library and DEVS:narrator.device on
  117. your system of this will NOT work. 
  118.  
  119. Well, there is actually one more command: 'Can it, Marvin'. This will 
  120. silently interrupt the current sample. (To be truely honest, ANY command
  121. will interrupt a sample - if it's known, it will be used, otherwise the
  122. sound just stops). Note: this does NOT work in Queue mode.
  123.  
  124. Be careful with the 'rescan' command: if there is a problem reading the
  125. new file, you will have no IDs at all... 
  126.  
  127. The options are the same as for Zound except for the -n option that doesn't
  128. exist here (tell me you need it and I'll fix that too... sigh). Here's the
  129. list:
  130.  
  131.     -r rate    How fast to play the sample. Default is what is in the
  132.         8SVX header or 310 if it's a raw file. This is usually
  133.         reasonable - most 'raw' samples I've come across are either
  134.         310 or 155. Lower numbers will play the sample faster.
  135.  
  136.     -v volume    Ranges between 0 and 64, 64 being max and default.
  137.  
  138.     -s start    Possible offset from the beginning. Default 0.
  139.  
  140.     -l length    Possible length unless you want it all. Default is
  141.         length of the sample. Be careful with these two, or
  142.         you might get undesired results.
  143.  
  144.     -c cycles    How many times to play each buffer. Default 1. Not
  145.         very useful, but you can get a nice "mouse" effect by
  146.         setting this to 2 and playing twice as fast...
  147.  
  148.     -d        Toggle debug information. Note that this will appear on
  149.         the standard output of the DAEMON, not where you called 
  150.         it from (that is, the ARexx script or wherever).
  151.  
  152.     -L        Play the sample in the left speaker only. If it's a stereo
  153.         sample only the left channel samples are used.
  154.     -R        Same as '-L' but for right speaker.
  155.     -S        Play in both speakers even if it's a mono sample.
  156.         Default for these three options are of course what is in the
  157.         8SVX header or -L if it's a raw sample.
  158.  
  159. Examples:
  160. =========
  161.  
  162. * Example of usage (from WShell etc):
  163.  
  164.     "address play file 'sounds:chopper'
  165.     "address play fade 2
  166.     "address play id 2001
  167.         "address play rescan 'ram:upd.IDs'
  168.     "address play exit
  169.  
  170.  
  171. * If you are using the vanilla 2.0 AREXX you might have to create a file
  172.   like this:
  173.  
  174.     /* A test script in AREXX */
  175.  
  176.     address PLAY say "Hi there!"
  177.  
  178.   Then execute it with 'rx filename.rexx'
  179.  
  180.   Alternatively, you can give a command like this (note the tick [']):
  181.  
  182.     rx 'address PLAY say "Hi there!"
  183.  
  184.  
  185. * Say "emulations":
  186.  
  187.     address play say "-f -r -s100 E T phone home."
  188.     address play phoneme "-s200 YUWNAEZ PEH1TERSUN"
  189.  
  190.  
  191. NOTE: Arexx normally converts everything to UPPERCASE and might try to
  192. do arithmetics etc on filenames which is why it's generally a good idea
  193. to 'singelquote' all paths, IDs etc. If you're looking for the port
  194. 'the hard way' to send your own message, the name is "PLAY" in uppercase.
  195.  
  196. NOTE2: If you are REALLY in a hurry to get rid of upd you could do this:
  197.  1) Send a any dummy Arexx message (this will stop the sound)
  198.  2) Send a break C to upd - break still works when upd is idle.
  199. or
  200.  A) Send the exit message.
  201.  
  202. The last might sound much easier than the first unless you (like me)
  203. have a trapped DisplayBeep() that 'pings' via upd.  In this case,
  204. producing a DisplayBeep() and a break C is much simpler.  The order is
  205. not relevant since the break is "queued". 
  206.  
  207.  
  208. Hints:
  209. ======
  210.  
  211. Running upd from your SOUNDS: directory is a nice way to get rid of having
  212. you type the FULL path everytime you want to play a sample. (The daemon
  213. has no simple way of knowing WHER